<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>工作台>电话咨询记录</title>
    <link rel="stylesheet" href="/Public/admin/css/gxxj/public_O.css">
    <link rel="stylesheet" href="/Public/admin/css/gxxj/user_details.css">
    <style>
    </style>
</head>
<body>
<div class="main3 phone_record">
    <div class="record_box">
        <span>-电话咨询描述：</span>
        <textarea class="input_bg_color" name="content" id="content" cols="70" rows="11" placeholder="请描述用户来电咨询内容" style="height: 80px;width: 400px"><{$data.content}></textarea>
    </div>
    <div class="record_box">
        <span class="list_title">-请选择用户来电时间：</span>
        <input class="laydate-icon" id="phonetime"  style="width: 210px"  type="text" readonly="" value="<{$data.ctime}>" onclick="layui.laydate({elem: this, istime: true, format: 'YYYY-MM-DD hh:mm'})">
    </div>
    <div class="record_box">
        <span class="list_title">-请选择要求回复时间：</span>
        <input class="laydate-icon" id="reply_time" style="width: 200px"  type="text" readonly="" value="<{$data.reply_time}>"  placeholder="没有要求可以为空"  onclick="layui.laydate({elem: this, istime: false, format: 'YYYY-MM-DD hh:mm'})">
    </div>
    <div class="record_box">
        <span class="list_title">-请选择处理状态：</span>
        <select id="back_status" class="selectBox" style="width: 210px" >
            <option value="2" <if condition="$data['status'] eq 2" >selected</if>>已回复</option>
            <option value="1" <if condition="$data['status']  eq 1">selected</if>>未回复</option>
            <option value="3" <if condition="$data['status'] eq 3" >selected</if>>已完成</option>
            <option value="4" <if condition="$data['status'] eq 4" >selected</if>>需回电</option>
        </select>
    </div>
    <div class="record_box">
        <span class="list_title">-来电用户手机号码：</span>
        <input class="input_bg_color" type="tel" value="<{$data.mobile}>"  id="phone" placeholder="请输入手机号码" style="width: 200px" />
    </div>
    <input  type="button" onclick="back_add()" value="确认" class="bg_color_red color_white reply_btn">
</div>

<!-- <script type="text/javascript" src="/Public/admin/js/jquery.min.js"></script>
<script type="text/javascript" src="/Public/admin/js/laydate/laydate.js"></script> -->
<script src="/Public/admin/js/jquery.min.js?v=2.1.4"></script>
<script src="/Public/admin/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/Public/admin/js/layer/layer.js"></script>
<script src="/Public/admin/js/layui/layui.js"></script>
<script src="/Public/admin/js/layui/lay/modules/laydate.js"></script>
<script>

    //回复反馈
    function back_add() {
        //加载loading层
        var index = layer.load(1, {
            shade: [0.1, '#fff'] //0.1透明度的白色背景
        });
        var id='<{$data.id}>';
        var  content=$("#content").val();
        var  status=$("#back_status").val();
        var  phone=$("#phone").val();
        var  time=$("#phonetime").val();
        var  reply_time=$("#reply_time").val();
        var url = "<{$SRVER_NAME}>/admin.php/ContactCenter/editfeedback";
        var partten = /^(1(3[0-9]|4[57]|5[0-35-9]|7[0135678]|8[0-9]))\d{8}$/;

        if (!partten.test(phone)) {
            layer.close(index);
            layer.alert("请输入正确手机号！\r\n", {
                title: '提示框',
                icon:0,
            });
            return false;
            //alert('不是手机号码');
        }
        $.post(url, {content: content, mobile: phone ,ctime:time,status:status,reply_time:reply_time,id:id}, function (data) {
            if (data.code =="1001") {
                var test=layer.alert(data.result,{title:'提示框',icon:1},function (index) {
                    setTimeout(window.parent.loselay(), 5000);
                    }
                );
            } else {
                layer.alert(data.result,{title:'提示框',icon:0});
            }
        });
        layer.close(index);
    }
</script>
</body>
</html>